﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CodeTop.八股
{
    abstract class People
    {
        private string name;
        protected string Name { get; set; }
       public            abstract void Test(string name);
    }
    class Man : People
    {
        public void printTest()
        {
            Man b = new Man();
            b.Name = "旺财";
            
        }

        public override void Test(string name)
        {
            throw new NotImplementedException();
        }
    }
    class Woman : People
    {
        public void printTest()
        {
           // People b = new People();
            // b.Name = "旺财";protected:访问仅限于包含类或从包含类派生的类型
            //protected只能在子类里面访问基类的一些对象
        }

        public override void Test(string name)
        {
            throw new NotImplementedException();
        }
    }


    class ProgramProtected
    {
        static void MainProtected(string[] args)
        {
            Man man = new Man();
            

            Woman woman = new Woman();
            woman.printTest();


        }

    }
   
    namespace MyNS
    {



    }

}
